
public class Student {
    public String name;
    public int age;

    //提供了有参构造方法，编译器将不会再提供无参构造方法
    public Student(String name){
        this.name = name;
    }
    public void print(){
        System.out.println(name+" "+age);
    }

   /* @Override
    public String toString() {
        return  name+" "+age;

    }*/

    public static void main(String[] args) {
        Student student = new Student("hello");
      /*  System.out.println(student);*/
        student.print();
    }
}
